What is conventional-changelog-conventionalcommits?
The conventional-changelog-conventionalcommits package is a preset for the conventional-changelog tool that formats changelogs according to the Conventional Commits specification. This specification outlines a set of rules for creating an explicit commit history, which makes it easier to automate the generation of release notes.
What are conventional-changelog-conventionalcommits's main functionalities?
Generating changelogs
This feature allows you to generate a changelog from git metadata using the conventional commits specification. The code sample demonstrates how to create a changelog stream and write it to a file.
const conventionalChangelog = require('conventional-changelog');
const fs = require('fs');
const stream = fs.createWriteStream('CHANGELOG.md');
conventionalChangelog({
preset: 'conventionalcommits'
}).pipe(stream);
Customizing changelog generation
This feature allows for customization of the changelog generation process. The code sample shows how to generate a changelog with all releases and includes a placeholder for additional configuration options.
const conventionalChangelog = require('conventional-changelog');
const fs = require('fs');
const stream = fs.createWriteStream('CHANGELOG.md');
conventionalChangelog({
preset: 'conventionalcommits',
releaseCount: 0, // Generate all releases
config: {
// Custom configuration here
}
}).pipe(stream);
Other packages similar to conventional-changelog-conventionalcommits
standard-version
standard-version is a utility for versioning using semver and CHANGELOG generation powered by conventional-changelog. It automates the versioning process and generates a changelog based on the conventions outlined in the Conventional Commits specification. It is similar to conventional-changelog-conventionalcommits but includes additional features for versioning and releasing.
lerna-changelog
lerna-changelog is a changelog generator for monorepos that use Lerna. It's tailored for repositories that use the Lerna tool and can group changes by Lerna packages. While it also generates changelogs based on commit messages, it is specifically designed for monorepo workflows and may not be as flexible as conventional-changelog-conventionalcommits for other types of projects.
semantic-release
semantic-release automates the whole package release workflow including determining the next version number, generating the release notes, and publishing the package. It uses the Conventional Commits specification to determine version bumps and changelog content. It provides a more comprehensive solution compared to conventional-changelog-conventionalcommits, which focuses solely on changelog generation.